<template>
    <el-popover
    placement="top"
    width="220"
    trigger="hover" v-if="data.user">
        <div style="padding: 5px;">
<!--            <div>-->
<!--                头像：-->
<!--                <el-image style="height: 50px;" :src="imageUrl + data.user.userImage"></el-image>-->
<!--            </div>-->
            <p>名称：{{ data.user.name }}</p>
            <p>权限：<el-tag>{{ roots[data.user.root].title }}</el-tag></p>
            <div>账号：{{ data.user.account }}</div>
        </div>
        <el-tag slot="reference">{{ data.user.name }}</el-tag>
    </el-popover>
</template>

<script>
import { mapState } from "vuex";

export default {
    props : ['data'],
    computed : {
        ...mapState(['roots']),
    }
}
</script>

<style>

</style>